3.2.17 \(\int \frac {c+d x^2+e x^4+f x^6}{a+b x^2} \, dx\) [117]

Optimal. Leaf size=100 \[ \frac {\left (b^2 d-a b e+a^2 f\right ) x}{b^3}+\frac {(b e-a f) x^3}{3 b^2}+\frac {f x^5}{5 b}+\frac {\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} b^{7/2}} \]

[Out]

(a^2*f-a*b*e+b^2*d)*x/b^3+1/3*(-a*f+b*e)*x^3/b^2+1/5*f*x^5/b+(-a^3*f+a^2*b*e-a*b^2*d+b^3*c)*arctan(x*b^(1/2)/a
^(1/2))/b^(7/2)/a^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {1824, 211} \begin {gather*} \frac {x \left (a^2 f-a b e+b^2 d\right )}{b^3}+\frac {\text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (a^3 (-f)+a^2 b e-a b^2 d+b^3 c\right )}{\sqrt {a} b^{7/2}}+\frac {x^3 (b e-a f)}{3 b^2}+\frac {f x^5}{5 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2),x]

[Out]

((b^2*d - a*b*e + a^2*f)*x)/b^3 + ((b*e - a*f)*x^3)/(3*b^2) + (f*x^5)/(5*b) + ((b^3*c - a*b^2*d + a^2*b*e - a^
3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(Sqrt[a]*b^(7/2))

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 1824

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a,
b}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {c+d x^2+e x^4+f x^6}{a+b x^2} \, dx &=\int \left (\frac {b^2 d-a b e+a^2 f}{b^3}+\frac {(b e-a f) x^2}{b^2}+\frac {f x^4}{b}+\frac {b^3 c-a b^2 d+a^2 b e-a^3 f}{b^3 \left (a+b x^2\right )}\right ) \, dx\\ &=\frac {\left (b^2 d-a b e+a^2 f\right ) x}{b^3}+\frac {(b e-a f) x^3}{3 b^2}+\frac {f x^5}{5 b}+\frac {\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) \int \frac {1}{a+b x^2} \, dx}{b^3}\\ &=\frac {\left (b^2 d-a b e+a^2 f\right ) x}{b^3}+\frac {(b e-a f) x^3}{3 b^2}+\frac {f x^5}{5 b}+\frac {\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} b^{7/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 98, normalized size = 0.98 \begin {gather*} \frac {x \left (15 a^2 f-5 a b \left (3 e+f x^2\right )+b^2 \left (15 d+5 e x^2+3 f x^4\right )\right )}{15 b^3}+\frac {\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} b^{7/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2),x]

[Out]

(x*(15*a^2*f - 5*a*b*(3*e + f*x^2) + b^2*(15*d + 5*e*x^2 + 3*f*x^4)))/(15*b^3) + ((b^3*c - a*b^2*d + a^2*b*e -
 a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(Sqrt[a]*b^(7/2))

________________________________________________________________________________________

Maple [A]
time = 0.14, size = 94, normalized size = 0.94

method result size
default \(\frac {\frac {1}{5} f \,x^{5} b^{2}-\frac {1}{3} a b f \,x^{3}+\frac {1}{3} b^{2} e \,x^{3}+a^{2} f x -a b e x +b^{2} d x}{b^{3}}+\frac {\left (-a^{3} f +a^{2} b e -a \,b^{2} d +b^{3} c \right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{b^{3} \sqrt {a b}}\) \(94\)
risch \(\frac {f \,x^{5}}{5 b}-\frac {a f \,x^{3}}{3 b^{2}}+\frac {e \,x^{3}}{3 b}+\frac {a^{2} f x}{b^{3}}-\frac {a e x}{b^{2}}+\frac {d x}{b}-\frac {\ln \left (b x -\sqrt {-a b}\right ) a^{3} f}{2 b^{3} \sqrt {-a b}}+\frac {\ln \left (b x -\sqrt {-a b}\right ) a^{2} e}{2 b^{2} \sqrt {-a b}}-\frac {\ln \left (b x -\sqrt {-a b}\right ) a d}{2 b \sqrt {-a b}}+\frac {\ln \left (b x -\sqrt {-a b}\right ) c}{2 \sqrt {-a b}}+\frac {\ln \left (-b x -\sqrt {-a b}\right ) a^{3} f}{2 b^{3} \sqrt {-a b}}-\frac {\ln \left (-b x -\sqrt {-a b}\right ) a^{2} e}{2 b^{2} \sqrt {-a b}}+\frac {\ln \left (-b x -\sqrt {-a b}\right ) a d}{2 b \sqrt {-a b}}-\frac {\ln \left (-b x -\sqrt {-a b}\right ) c}{2 \sqrt {-a b}}\) \(265\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x,method=_RETURNVERBOSE)

[Out]

1/b^3*(1/5*f*x^5*b^2-1/3*a*b*f*x^3+1/3*b^2*e*x^3+a^2*f*x-a*b*e*x+b^2*d*x)+(-a^3*f+a^2*b*e-a*b^2*d+b^3*c)/b^3/(
a*b)^(1/2)*arctan(b*x/(a*b)^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 0.52, size = 97, normalized size = 0.97 \begin {gather*} \frac {{\left (b^{3} c - a b^{2} d - a^{3} f + a^{2} b e\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b^{3}} + \frac {3 \, b^{2} f x^{5} - 5 \, {\left (a b f - b^{2} e\right )} x^{3} + 15 \, {\left (b^{2} d + a^{2} f - a b e\right )} x}{15 \, b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="maxima")

[Out]

(b^3*c - a*b^2*d - a^3*f + a^2*b*e)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^3) + 1/15*(3*b^2*f*x^5 - 5*(a*b*f - b^2
*e)*x^3 + 15*(b^2*d + a^2*f - a*b*e)*x)/b^3

________________________________________________________________________________________

Fricas [A]
time = 4.57, size = 246, normalized size = 2.46 \begin {gather*} \left [\frac {6 \, a b^{3} f x^{5} - 10 \, a^{2} b^{2} f x^{3} - 15 \, {\left (b^{3} c - a b^{2} d - a^{3} f + a^{2} b e\right )} \sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) + 30 \, {\left (a b^{3} d + a^{3} b f\right )} x + 10 \, {\left (a b^{3} x^{3} - 3 \, a^{2} b^{2} x\right )} e}{30 \, a b^{4}}, \frac {3 \, a b^{3} f x^{5} - 5 \, a^{2} b^{2} f x^{3} + 15 \, {\left (b^{3} c - a b^{2} d - a^{3} f + a^{2} b e\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) + 15 \, {\left (a b^{3} d + a^{3} b f\right )} x + 5 \, {\left (a b^{3} x^{3} - 3 \, a^{2} b^{2} x\right )} e}{15 \, a b^{4}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="fricas")

[Out]

[1/30*(6*a*b^3*f*x^5 - 10*a^2*b^2*f*x^3 - 15*(b^3*c - a*b^2*d - a^3*f + a^2*b*e)*sqrt(-a*b)*log((b*x^2 - 2*sqr
t(-a*b)*x - a)/(b*x^2 + a)) + 30*(a*b^3*d + a^3*b*f)*x + 10*(a*b^3*x^3 - 3*a^2*b^2*x)*e)/(a*b^4), 1/15*(3*a*b^
3*f*x^5 - 5*a^2*b^2*f*x^3 + 15*(b^3*c - a*b^2*d - a^3*f + a^2*b*e)*sqrt(a*b)*arctan(sqrt(a*b)*x/a) + 15*(a*b^3
*d + a^3*b*f)*x + 5*(a*b^3*x^3 - 3*a^2*b^2*x)*e)/(a*b^4)]

________________________________________________________________________________________

Sympy [A]
time = 0.36, size = 160, normalized size = 1.60 \begin {gather*} x^{3} \left (- \frac {a f}{3 b^{2}} + \frac {e}{3 b}\right ) + x \left (\frac {a^{2} f}{b^{3}} - \frac {a e}{b^{2}} + \frac {d}{b}\right ) + \frac {\sqrt {- \frac {1}{a b^{7}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log {\left (- a b^{3} \sqrt {- \frac {1}{a b^{7}}} + x \right )}}{2} - \frac {\sqrt {- \frac {1}{a b^{7}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log {\left (a b^{3} \sqrt {- \frac {1}{a b^{7}}} + x \right )}}{2} + \frac {f x^{5}}{5 b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**6+e*x**4+d*x**2+c)/(b*x**2+a),x)

[Out]

x**3*(-a*f/(3*b**2) + e/(3*b)) + x*(a**2*f/b**3 - a*e/b**2 + d/b) + sqrt(-1/(a*b**7))*(a**3*f - a**2*b*e + a*b
**2*d - b**3*c)*log(-a*b**3*sqrt(-1/(a*b**7)) + x)/2 - sqrt(-1/(a*b**7))*(a**3*f - a**2*b*e + a*b**2*d - b**3*
c)*log(a*b**3*sqrt(-1/(a*b**7)) + x)/2 + f*x**5/(5*b)

________________________________________________________________________________________

Giac [A]
time = 1.19, size = 106, normalized size = 1.06 \begin {gather*} \frac {{\left (b^{3} c - a b^{2} d - a^{3} f + a^{2} b e\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b^{3}} + \frac {3 \, b^{4} f x^{5} - 5 \, a b^{3} f x^{3} + 5 \, b^{4} x^{3} e + 15 \, b^{4} d x + 15 \, a^{2} b^{2} f x - 15 \, a b^{3} x e}{15 \, b^{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="giac")

[Out]

(b^3*c - a*b^2*d - a^3*f + a^2*b*e)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^3) + 1/15*(3*b^4*f*x^5 - 5*a*b^3*f*x^3
+ 5*b^4*x^3*e + 15*b^4*d*x + 15*a^2*b^2*f*x - 15*a*b^3*x*e)/b^5

________________________________________________________________________________________

Mupad [B]
time = 0.94, size = 96, normalized size = 0.96 \begin {gather*} x^3\,\left (\frac {e}{3\,b}-\frac {a\,f}{3\,b^2}\right )+x\,\left (\frac {d}{b}-\frac {a\,\left (\frac {e}{b}-\frac {a\,f}{b^2}\right )}{b}\right )+\frac {f\,x^5}{5\,b}+\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (-f\,a^3+e\,a^2\,b-d\,a\,b^2+c\,b^3\right )}{\sqrt {a}\,b^{7/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2),x)

[Out]

x^3*(e/(3*b) - (a*f)/(3*b^2)) + x*(d/b - (a*(e/b - (a*f)/b^2))/b) + (f*x^5)/(5*b) + (atan((b^(1/2)*x)/a^(1/2))
*(b^3*c - a^3*f - a*b^2*d + a^2*b*e))/(a^(1/2)*b^(7/2))

________________________________________________________________________________________